<?php
		//item notes
		$notes = $this->item->getNotes();
		//referrer obj for deleting notes
		$note_ref = 'itemID=' . $this->item->getItemID();
		
		//reserve notes - only applies if we are editing a reserve (item instance linked to a course instance)
		if($this->reserve) {	//we are editing reserve info
			//notes
			$notes = $this->reserve->getNotes(true);
			//override referrer obj
			$note_ref = 'reserveID=' . $this->reserve->getReserveID();			
		}
?>
		<div class="headingCell1">NOTES</div>
		<div id="item_notes" style="padding:8px 8px 12px 8px;">
			<?php $this->getDisplayer()->displayEditNotes($notes, $note_ref); ?>
			
<?php
		//only allow adding notes to reserves (not items) unless edited by staff
		if($this->reserve || Account_Rd::atLeastStaff()) {
?>
			<div id="add_note" style="text-align:center; padding:10px; border-top:1px solid #333333;">
				<?php $this->getDisplayer()->displayAddNoteButton($note_ref); //display "Add Note" button ?>			
			</div>
<?php	} ?>
		</div>